<% content_for :sidebar_title do %>
  <%= Spree.t(:lifetime_stats) %>
<% end %>

<% content_for :sidebar do %>
  <nav class="menu">
    <fieldset class='no-border-top' data-hook="admin_user_lifetime_stats">
      <dl id="user-lifetime-stats">
        <dt><%= Spree.t(:total_sales) %>:</dt>
          <dd><%= @user.display_lifetime_value.to_html %></dd>
        <dt><%= Spree.t(:num_orders) %>:</dt>
          <dd><%= @user.order_count.to_i %></dd>
        <dt><%= Spree.t(:average_order_value) %>:</dt>
          <dd><%= @user.display_average_order_value.to_html %></dd>
        <dt><%= Spree.t(:member_since) %>:</dt>
          <dd><%= l @user.created_at.to_date %></dd>
      </dl>
    </fieldset>
  </nav>
<% end %>
